#include <iostream>
using namespace std;
template<typename T>

void Swap(T &a, T &b)
{
    T temp = a;
    a = b;
    b = temp;
}

int main()
{
    //交换int 变量的值
    int n1 = 100, n2 = 200;
    Swap(n1, n2);
    cout<<n1<<","<<n2<<endl;

    // 交换float变量的值
    float f1 = 12.22, f2 = 56.34;
    Swap(f1, f2);
    cout<<f1<<","<<f2<<endl;
    return 0;
}

